Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xdp prefixes and move portal implementations to new directory #1438

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

swick
Copy link
Contributor

@swick swick commented Sep 23, 2024

This renames a bunch of classes, enums and functions to have the XDP prefix. The portal implementations are moved into the portals subdir. Sources for helper binaries are moved to the new helpers subdir.

A lot of code movement but no functional changes.

Moves the files from launch-context to xdp-app-launch-context because it
implements the XdpAppLaunchContext class.
It is defined and used in this namespace so rename it to
XdpSessionPersistenceMode.
The files implement functions in the XdpSessionPersistence namespace so
rename the files accordingly.
Renames the portal-impl files to xdp-portal-impl.
Rename the Call class to XdpCall and adjust the function names
accordingly.
Renames the call files to xdp-call.
Rename the Request class to XdpRequest and adjust the function names
accordingly.
Renames the request files to xdp-request.
Rename the Session class to XdpSession and adjust the function names
accordingly.
Renames the session files to xdp-session.
Rename the Permission enum and related functions to have an XDP prefix.
Renames the permission files to xdp-permission.
Rename the DocumentFlags enum and related functions to have an XDP
prefix.
Renames the documents files to xdp-documents.
@swick swick marked this pull request as ready for review October 4, 2024 11:13
@swick
Copy link
Contributor Author

swick commented Oct 4, 2024

I know the diff looks daunting but this really just needs an ack on the decisions I've made here, namely:

  • do we want to move everything to the xdp prefix?
  • do we want to move the portal implementations to their own directory?
  • do we want to move the helpers to their own directory?
  • is it worth to do all of that and also require everyone to rebase on top of it?

@GeorgesStavracas @jadahl

@jadahl
Copy link
Collaborator

jadahl commented Oct 4, 2024

Proper namespacing is important when doing shared libraries. I'm a bit less convinced e.g. Session needs to become XdpSession in xdg-desktop-portal though, I have never felt the need to add it in the past, and in that particular case it also departs from the convention of other types corresponding to APIs (i.e. no xdp prefixing). Same applies to Request.

The moving around and renaming files I see the point, but also there are not that many files, so it doesn't get us that much, and makes git archeology a bit more annoying.

So, overall, I think the structure we have already is good enough, and this doesn't improve things enough to make it worth it.

No strong opinions though.

@swick
Copy link
Contributor Author

swick commented Oct 4, 2024

Not having a prefix means we can't use the G_DECLARE_TYPE macros which is the main motivation for me. It unlocks a bunch of other cleanups, having a proper split between private and public API etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

2 participants